<?=$this->render ( 'public/left.phtml' );?>
<div class="admin-right">
<div class="admin-menu">
<li><a href="/admin/site">小站列表</a></li>
<li><a href="/admin/site/site/do/create">创建小站</a></li>
</div>

<div class="clear"></div>

<?php
if ($this->do == 'create') {?>
<div class="menu"><a href="/admin/site">小站列表</a>>创建小站</div>
<div class="admin-create">
<?php
	if ($this->step == 1) {
		?>
<div class="title">小站名称:<?=$_POST ['site_name']?></div>
<form id="model" name="form1" method="post"
	action="/admin/site/site/do/create/step/post">
<div class="title">&nbsp;为小站添加一个模块</div>
<table>
	<tr>
		<td>模块名称</td>
		<td><input type="text" name="model_name" id="model_name" class="input" /></td>
	</tr>
	<tr>
		<td>模块类型</td>
		<td><select name="model_type" id="model_type">
          <?php
		foreach ( $this->siteModel as $k => $v ) {
			?>
          <option value="<?=$k?>"><?=$v?></option>
          <?
		}
		?>   
          </select></td>
	</tr>
	<tr>
		<td>首页显示</td>
		<td><select name="show_index" id="model_show_index">
			<option value="0">不显示</option>
			<option value="5">显示5条</option>
			<option value="10">显示10条</option>
			<option value="20">显示20条</option>
		</select></td>
	</tr>
	<tr>
		<td>模块介绍</td>
		<td><textarea name="model_intro" id="model_intro" cols="45" rows="5"
			class="input1" maxH=0 ></textarea></td>
	</tr>
	<tr>
		<td>&nbsp;</td>
		<td><input type="submit" value="提 交" /> <a
			href="javascript:history.go(-1)">上一步</a> <input name="site_name"
			type="hidden" id="site_name" value="<?=$_POST ['site_name']?>" /> <input
			name="site_seo_name" type="hidden" id="site_seo_name"
			value="<?=$_POST ['site_seo_name']?>" /> <input name="site_intro"
			type="hidden" id="site_intro" value="<?=$_POST ['site_intro']?>" />
		  <input
			name="category_id" type="hidden" id="category_id"
			value="<?=$_POST ['category_id']?>" /></td>
	</tr>
</table>
</form>

<?
	}
	else {
		?>
<form id="site" name="form1" method="post"
	action="/admin/site/site/do/create/step/1">
<div class="title">创建小站</div>
<table>
	<tr>
		<td>小站名称</td>
		<td><input type="text" name="site_name" id="site_name" class="input" /></td>
	</tr>
	<tr>
	  <td>小站分类</td>
	  <td><select name="category_fid" id="category_fid">
		<option value="0">默认分类</option>
<?php
	foreach ( $this->categoryFirst as $category ) {
		echo '<option value="'.$category ['category_id'].'">'.$category ['category_name'].'</option>';
	}
?>	    
	    </select>
          <select name="category_id" id="get_category">
           <option value="0">请选择</option>
          </select>
        </td>
	  </tr>
	<tr>
		<td>个性域名</td>
		<td><input type="text" name="site_seo_name" id="site_seo_name"
			class="input" /></td>
	</tr>
	<tr>
		<td>小站介绍</td>
		<td><textarea name="site_intro" id="site_intro" cols="45" rows="5"
			class="input1" maxH=0 ></textarea></td>
	</tr>
	<tr>
		<td>&nbsp;</td>
		<td><input type="submit" value="下一步" /></td>
	</tr>
</table>
</form>
<?
	}
	?>
<?
}
elseif ($this->do == 'edit') {
	?>
<div class="menu"><a href="/admin/site">小站列表</a>>编辑小站</div>
<div class="admin-create">
<form id="site" name="form1" method="post"
	action="/admin/site/site/do/edit">
<div class="title">编辑小站</div>
<table>
	<tr>
		<td>小站名称</td>
		<td><input type="text" name="site_name" id="site_name" class="input"
			value="<?=$this -> siteInfo ['site_name']?>" /></td>
	</tr>
	<tr>
	  <td>小站分类</td>
	  <td><select name="category_id" id="category_id">
		<option value="0">默认分类</option>
<?php
	foreach ( $this->categoryFirst as $category ) {
		if($category['category_id'] == $this->fid['category_fid']){
			echo '<option value="'.$category ['category_id'].'"  selected="selected">'.$category ['category_name'].'</option>';
		}else{
			echo '<option value="'.$category ['category_id'].'">'.$category ['category_name'].'</option>';
		}
	}
?>	    
	    </select></td>
	  </tr>
	<tr>
		<td>个性域名</td>
		<td><input type="text" name="site_seo_name" id="site_seo_name"
			class="input" value="<?=$this -> siteInfo ['site_seo_name']?>" /></td>
	</tr>
	<tr>
		<td>小站介绍</td>
		<td><textarea name="site_intro" id="site_intro" cols="45" rows="5"
			class="input1" maxH=0 ><?=$this -> siteInfo ['site_intro']?></textarea></td>
	</tr>
	<tr>
		<td>&nbsp;</td>
		<td><input type="submit" value="提交编辑" /> <input name="site_id"
			type="hidden" id="site_id" value="<?=$this -> siteInfo ['site_id']?>" /></td>
	</tr>
</table>
</form>
</div>
<?
}
?>
</div>
<!-- end admin-create--></div>
<!-- end admin-right-->



